import request from '@/utils/request'

export function getEPerSonnel(id) {
  return request({
    url: '/personnel/courier/'+id,
    method: 'get'
  })
}
export function getzhifu(orderNumber) {
  return request({
    url: '/parcel/parcel/order/orderNumber/'+orderNumber,
    method: 'post'
  })
}
export function getpersonnel(id) {
  return request({
    url: '/personnel/courier/'+id,
    method: 'get'
  })
}

export function sendSms(phoneNumber) {
  return request({
    url: '/parcel/parcel/package/'+phoneNumber,
    method: 'post'
  })
}
export function sendAddress(phoneNumber) {
  return request({
    url: '/parcel/parcel/package/'+phoneNumber,
    method: 'post'
  })
}



// 查询EPackageTable列表
export function listParcel(query) {
  return request({
    url: '/parcel/parcel/package/list',
    method: 'get',
    params: query
  })
}

// 查询EPackageTable详细
export function getParcel(id) {
  return request({
    url: '/parcel/parcel/package/' + id,
    method: 'get'
  })
}

// 新增EPackageTable
export function addParcel(data) {
  return request({
    url: '/parcel/parcel/package',
    method: 'post',
    data: data
  })
}

// 修改EPackageTable
export function updateParcel(data) {
  return request({
    url: '/parcel/parcel/package',
    method: 'put',
    data: data
  })
}

// 删除EPackageTable
export function delParcel(id) {
  return request({
    url: '/parcel/parcel/package' + id,
    method: 'delete'
  })
}
export function StatisticsParcel(query) {
  return request({
    url: '/parcel/parcel/package/Statistics',
    method: 'get',
    params: query
  })
}
export function getEOr1derPackage(orderNumber) {
  return request({
    url: '/parcel/parcel/process/select/'+orderNumber,
    method: 'post'
  })
}
export function getEOr1derPackageByOrderNumber(orderNumber) {
  return request({
    url: '/parcel/parcel/process/select/'+orderNumber,
    method: 'post'
  })
}


export function StatisticsPackageParcel(query) {
  return request({
    url: '/parcel/parcel/package/StatisticsPackage',
    method: 'get',
    params: query
  })
}

// 查询EPackageTable每个月的派件数量
export function listTrend(query) {
  return request({
    url: '/parcel/parcel/package/trend',
    method: 'get',
    params: query
  })
}

export function listPackages(query) {
  return request({
    url: '/parcel/parcel/package/packages',
    method: 'get',
    params: query
  })
}

export function BoxParcel(query) {
  return request({
    url: '/parcel/parcel/package/box',
    method: 'get',
    params: query
  })
}
